The present invention relates to a microcomputer and also to electronic equipment and a debugging system comprising the same.
There has recently been increasing demand for the incorporation of microcomputers that are capable of implementing high-level information processing into electronic equipment such as game machines, car navigation systems, printers, and portable information terminals. Such a thus-incorporated microcomputer is usually mounted on a user board called a target system. A software development support tool called an in-circuit emulator (ICE) is widely used for supporting the development of software to be used in the target system.
The CPU-switching (swapping) type of ICE shown in FIG. 1A is the most common type of this kind of ICE used in the art. With this CPU-switching ICE, a microcomputer 302 is removed from a target system 300 during debugging, and a probe 306 of a debugging tool 304 is connected thereto instead. This debugging tool 304 emulates the operation of the removed microcomputer 302. The debugging tool 304 can also perform various processes necessary for debugging.
However, this CPU-switching ICE has disadvantages in that there is a large number of pins on the probe 306 and also a large number of lines 308 of the probe 306. It is therefore difficult to emulate the operation of the microcomputer 302 at high frequencies (the limit is at approximately 33 MHz, by way of example). It is also difficult to design the target system 300. Furthermore, the operating environment of the target system 300 (signal timings and load conditions) changes between the situation when the microcomputer 302 is installed and operating as designed and the situation when the debugging tool 304 is emulating the operation of the microcomputer 302. This CPU-switching ICE also has problems in that, if a different microcomputer is used, even if it is a modified version thereof, it is necessary to use a debugging tool of a different design and a probe in which the numbers and positions of the pins are different.
A known method of solving these disadvantages of such the CPU-switching ICE is an ICE in which a monitor program 310 is mounted in a target system 312, as shown in FIG. 1B. However, such a monitor program mounting type ICE is required to have a function of executing all the debugging commands (program loading, go, step execution, reading/writing of memory, reading/writing of internal register and setting/release of breakpoint). This will highly increase the size of instruction code in the monitor program 310 (for example, 30 to 50 Kbytes). Thus, the memory area available for user is decreased and also the difference in system between debugging and non-debugging operation cause problems. In order to overcome the problem of FIG. 1B, there has been proposed an on-chip debugging method in which a monitor program is installed into the chip. However, this raises another problem in that the size of the chip must be increased when a monitor program having a large size of instruction code is mounted within the chip.